#pragma once

#include "Containers/Containers.h"
#include "ScriptCompiler/AST/SentenceNode.h"

#include "ExpressionSentence.h"

class CSentenceBlockNode;

class CWhileNode : public CSentenceNode
{
public:
    CWhileNode(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile, EASTNodeType::While)
    {
    }

    //while
    std::shared_ptr<CScriptToken> While;

    //condition
    std::shared_ptr<CExpressionNode> Condition;

    //body
    std::shared_ptr<CSentenceBlockNode> Body;

    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return While; }

};